package com.qf.config;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * <p>@user HopeULife</p>
 * <p>@date 2021/11/1</p>
 * 一些常用的配置
 */
@PropertySource("classpath:app-config.properties")
@ConfigurationProperties(prefix = "app")
@Configuration
@Data
public class AppProperties {
    private Jwt jwt = new Jwt();
    private Sms sms = new Sms();
    private WxPay wxpay=new WxPay();

    @Setter
    @Getter
    public static class Jwt {
        private long accessJwtExpire;
        private long refreshJwtExpire;
        private String key;
        private String refreshKey;
    }

    @Setter
    @Getter
    public static class Sms {
        private Integer key;
        private String openId;
    }

    /**
     * wxpay相关配置
     */
    @Setter
    @Getter
    public static class WxPay {
        private String key;
        private String appId;
        private String mchId;
    }

}
